﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Utilities.Web.ExtJs
{
    public class Envelope
    {
        public Envelope()
        {
            success = true;
        }
        /// <summary>
        /// Whether the operation succeeded or not
        /// </summary>
        public bool success { get; set; }

        /// <summary>
        /// The message to send to the client
        /// </summary>
        public string msg { get; set; }

        protected void SetError(Exception exception)
        {
            success = false;
            msg = exception.Message;
        }
    }
}
